﻿#ifndef PLUG_INFO_H
#define PLUG_INFO_H

#include <QMap>
#include <QObject>

struct _ETHERNET
{
	QString ip;
};

struct _485
{
	QString com;
	QString baud;
	QString parity;
	QString dataBit;
	QString stopBit;

};


struct _CAN
{
	QString com;
	QString baud;
	QString parity;
	QString dataBit;
	QString stopBit;
};


class PlugInfo
{
    static PlugInfo * instance;
public:
    PlugInfo();
    static PlugInfo * Instance();
    static void init_port_default();

    static bool load_port_setting();

	static bool loadSetting();
    static void save_port_Setting();

    static QMap<QString, _ETHERNET > map_ethernet;  //24
    static QMap<QString, _485 > map_485;            //66
    static QMap<QString, _CAN > map_can;            //66

};

#endif // PLUG_INFO_H
